'use strict';

angular.module('app.personal', [
    'ui.router',
    'ngResource'
])

angular.module('app.personal').filter('status_filter_apply', function () {
    return function (input) {
    	console.log(input);
        if (input == 0) {
            return "接任务";
        } else if(input == 1){
            return "已申请";
        } else{
        	return "0"
        }

    }
})
.config(function ($stateProvider,$urlRouterProvider) {
    
    $stateProvider
         .state('app.personal', {
             abstract: true,
             data: {
                 title: '个人中心'
             }
         })

      
        .state('app.personal.join_company', {
            url: '/join_company',
            views: {
                "content@app": {
                	controller: 'JoinCompany',
                    templateUrl: 'app/personal/views/join_company.html'
                }
            },
            data: {
                title: '我的公司',
                // level: 'level_2'
                level: 'level_1'                
            }
        })
        
        .state('app.personal.per_user', {
            url: '/per_user',
            views: {
                "content@app": {
                	controller: 'PerUserCtrl',
                    templateUrl: 'app/personal/views/per_user.html'
                }
            },
            data: {
                title: '个人信息',
                level: 'level_8'//！！
            }
         })

});
angular.module('app.personal').filter('company_type', function () {
    return function (input) {
        if (input == "1") {
            return "虚拟设计院";
        } else if (input == "2") {
            return "物联网";
        } else if (input == "3") {
            return "粮库";
        }

    }
})
